-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: GH39443 - categorical datetime concat #41061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST: GH39443 - categorical datetime concat #41061
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected = DataFrame( | ||
{ | ||
"x": Series( | ||
[datetime(2021, 1, 1), datetime(2021, 1, 2)], dtype="category" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referencing some of your exploration on the related issue, I think not returning a categorical on this concatenation is expected since the inputs don't have same categorical dtype (eg different categories).
The same behavior is seen if you just do something like replace the input to df1
and df2
with 1 and 2, respectively (gives int dtype result, not categorical).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes a lot of sense. I've rebased to my original commit removing the categorical dtype in the expected
dataframe. However, I think the tests are going to fail again with seemingly contradictory messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on 1.1.5 the return type is datetime64[ns] and this is also the case on 1.2.4 and master. So testing that this matches the 1.1.5 behavior is fine.
37731b6
to
1295868
Compare
not needed |
@arredond can you merge master and ping on green |
…tegorical_datetime_concat_test
@simonjayhawkins merged but no green. Apart from a couple of conda build fails I'm back to my original error:
|
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
Thanks for the PR, but appears this PR has gone stale and looks like it needs a little further investigation to solve the bug. Closing, but please let us know if you'd be interested in continuing and we'd be happy to reopen. |
pandas/doc/source/whatsnew/
, i.e.,v1.3.0.rst
?